package com.basic.modules.nykf.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.basic.common.utils.R;
import com.basic.modules.nykf.entity.CustomerShopBusinessEntity;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface CustomerShopBusinessService extends IService<CustomerShopBusinessEntity> {

    // 添加业务数据
    R addCustomerShopBusiness(CustomerShopBusinessEntity customerShopBusinessEntity);

    // 根据店铺ID生成业务名称
    R getYwmcByCustomerIdAndCustomerShopId(Map map);

    // 计算续费日期
    Date calcXfrq(long customerId, Date ywjsrq);

    /**
     * 根据客户id及收费模式去修改业务底薪(业务名称排序、第一个是业务底薪、其它是0)
     * 调用时机：业务停止、续费收费、续费退款
     */
    void setYwdxByCustomerIdAndSfms_set(Map map);

    // 修改合并表的合计咨询量
    void setZxlByCustomerIdAndSfms_set(long customerId,String sfmsVal);

    /**
     * 根据客户id及收费模式去排序业务底薪
     */
    void setYwdxByCustomerIdAndSfms_order(List<Map> list);

    // 获取这个收费模式(分组)除了当前主业务之外的其它业务
    List<CustomerShopBusinessEntity> getSfmsYwListByCustomerShopBusinessId(Map map);
}